import 'package:f_base_one/pages/order_detail.dart';
import 'package:flutter/material.dart';

class OrderList extends StatelessWidget {
  const OrderList({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('订单列表页 1111'),
      ),
      body: Center(
        child:Column(
          children: [
            // 手势组件
            GestureDetector(
              // 点击事件
              onTap: () {
                // 跳转到订单详情页
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (BuildContext context) {
                      return const OrderDetail();
                    },
                  ),
                );
              },
              child: Image.network(
                'https://yanxuan-item.nosdn.127.net/e529b6ab111ade9da9314867f98d360f.png',
                width: 200,
              ), 
        ),
        TextButton(
          onPressed: () {
            // 跳转到订单详情页
            Navigator.push(
              context,
              MaterialPageRoute(
                builder: (BuildContext context) {
                  return const OrderDetail();
                },
              ),
            );
          },
          child: const Text('去详情页'),
           )
          ],
        ),
      ),
    );
  }
}